package qc.module.demo.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum UserEnableEnum {
    //枚举值
    QI(true,"启用"),JIN(false,"禁用");

    @EnumValue
    private Boolean value; //数据库映射字段

    @JsonValue
    private String name;

    //给前端返回的值，重写toString方法，有了JsonValue注解则不需要
//    @Override
//    public String toString(){
//       return name;
//    }
}
